﻿#region usings
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using System.Diagnostics;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace Kosmos
{
    public class AudioManager
    {

        #region Fields XACT
        /*
        AudioEngine audioEngine;
        SoundBank soundBank;
        WaveBank waveBank;
        Cue cue;
        string path = "audio0";*/

        #endregion

        #region Initialize

        public AudioManager()
        {
            /*
            audioEngine = new AudioEngine("Content\\Audio\\KosmosAudio.xgs");
            soundBank = new SoundBank(audioEngine,"Content\\Audio\\Sound Bank.xsb");
            waveBank = new WaveBank(audioEngine, "Content\\Audio\\Wave Bank.xwb");

            LoadMusic();*/
        }

        public void LoadMusic()
        {
            
            Random number = new Random();
            int i = ((int)((number.NextDouble() * 100))) % 6 + 1;

            //cue = soundBank.GetCue(path + i);
            //cue.Play();

        }

        #endregion

        #region Public Methods

        public void playMusic()
        {
            Random number = new Random();
            int i = ((int)(number.NextDouble() * 100) % 6) + 1;
            /*
            if (!cue.IsPlaying)
            {
                //cue = soundBank.GetCue(path + i);
                cue.Play();
            }*/
        }

        public void stop()
        {
            /*if(cue.IsPlaying)
                cue.Stop(AudioStopOptions.AsAuthored);*/
        }

        #endregion
    }
}